package service.impl;

import dao.UserDao;
import dao.impl.UserDaoImpl;
import entity.User;
import service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    private UserDao ud=new UserDaoImpl();

    @Override
    public boolean insertUser(String name, String psw) {
        if(ud.addUser(name,psw)==1){
            return true;
        }
        return false;
    }

    @Override
    public List<User> queryUser(String name) {
        return ud.selectUser(name);
    }
}
